<&include file="include/header.tpl" title=$title username=$user_firstname web_site=$web_site page_css="goal-detail.css"&>

<!--page_text-->
	<div id="main">

<!--side-->        
        <div id="left-body">
        	<div class="box1">
            	<img src="<&$web_site&>/<&$goal.user.thumb_photo&>" />
                <div class="user">
                	<s></s>
                	<a href="<&$web_site&>/goal/community/gid/<&$goal.id&>"><h1><&if $goal.gen_goal_id == 0&><&$goal.goal_name&><&else&><&$objConfigModel->getGenGoal($goal.gen_goal_id)&><&/if&></h1></a>
                    <span class="from">Posted: by: <a class="name" href="<&$web_site&>/user/detail/uid/<&$goal.user.id&>"><&$objConfigModel->genUsername($goal.user.firstname, $goal.user.lastname)&> </a></span>
                    <span class="address"><&$objConfigModel->getArea($goal.user.area_id)&></span>
                    <&if $user.id == $goal.user.id&>
                    <!--<a href="#nogo" class="edit">edit</a>-->
                    <&/if&>
                </div>
            </div>
        	
        	<div class="box4">
            	<p class="title">&nbsp;</p>
            	<div class="optionbox">                    
                	<div class="option"><a href="#nogo" class="show_option_1 now" tab="goal_detail_bids"">Trainer Bids</a><a href="#nogo" class="show_option_2" tab="goal_detail_cheerleaders">My cheerleaders</a></div>
                </div>    
                <!--all bids-->
                <table cellpadding="0" cellspacing="0" border="0"  class="saylists" id="goal_detail_bids">
                	<&foreach item=bid from=$goal.bid_list name=bid_list&>
                    <tr class="ask-box"><td class="left-say">
                    	<a href="<&$web_site&>/user/detail/uid/<&$bid.user.id&>">
                        <img src="<&$web_site&>/<&$bid.user.thumb_photo&>" />
                        <span><&$objConfigModel->genUsername($bid.user.firstname, $bid.user.lastname)&></span>
                        </a>
                    </td>
                    <td class="right-say">                    	
                    	<div class="saybox"><s></s>
                        	<!--<strong><&$bid.subject&></strong>-->
                        	<p class="pad-r120 <&if $bid.id == $goal.selected_bid&>aw<&/if&>"><&$bid.subject&></p>
                            <i><&$bid.created_time|date_format:"%m/%d/%Y"&></i>
                            
                            <span><a href="#nogo"><em class="like" bid="<&$bid.id&>">Like</em></a><&$bid.like_cnt&> likes<a href="<&$web_site&>/goal/biddetail/bid/<&$bid.id&>" class="golink">See Detail</a></span>
                        </div>
                    </td></tr>
                    <&/foreach&>
                    <!--over-->
                    
                </table>
                <!--end of all bids-->
                
                <!--start the cheerleaders-->
                <table cellpadding="0" cellspacing="0" border="0"  class="saylists" style="display:none" id="goal_detail_cheerleaders">
                	<!--ask-->
                    <&foreach item=cheer from=$goal.cheer_list name=cheer_list&>
                    <tr class="ask-box"><td class="left-say">
                    	<a href="/user/detail/uid/<&$cheer.user.id&>">
                        <img src="<&$web_site&>/<&$cheer.user.thumb_photo&>" />
                        <span><&$objConfigModel->genUsername($cheer.user.firstname, $cheer.user.lastname)&></span>
                        </a>
                    </td>
                    <td class="right-say">                    	
                    	<div class="saybox"><s></s>
                        	<p class="pad-r120"><&$cheer.cheer_content&></p>
                            <i><&$cheer.created_time|date_format:"%m/%d/%Y"&></i>
                            
                            <span><a href="#nogo"><em class="like" cheer_id="<&$cheer.id&>">Like</em></a><&$cheer.like_cnt&> likes</span>
                        </div>
                    </td></tr>
                    <&/foreach&>
                </table>
                <!--end of the cheerleaders-->
            </div>
            
            <div class="box2">
            	<strong>User Goal detail</strong>
                <div class="left">
                    <!--<label>Body type:</label>
                    <span><&$objConfigModel->getBody($goal.body_id)&></span>
                    <label>Age:</label>
                    <span><&$objConfigModel->getAge($goal.age_id)&></span>
                	<label>Reach goal by:</label>
                    <span><&$goal.deadline|date_format:"%m/%d/%Y"&></span>
                    <label>to get ready for:</label>
                    <span><&$goal.purpose&></span>-->
                    <label>Looking for:</label>
                    <span><&$goal.trainer_types&></span>
                </div>
                <div class="right">
                	<h2>Details about your fitness goal</h2>
                    <p>
                    <&$goal.content&>
                    </p>
                    
                </div>                
            </div> 
        </div>
<!--side_over-->        
        <div id="right-side">
			<div class="box1">
            	<div class="budget"><label>Budget</label><span>$</span><&$goal.budget&></div>
                <!--<div class="deadline"><label>Deadline</label><&$goal.deadline|date_format:"%m/%d/%Y"&></div>-->
                <&if $user.id == $goal.user.id&>    
                <a href="#pop5" class="show_pop5" id="<&$goal.id&>" goal_name="<&if $goal.gen_goal_id == 0&><&$goal.goal_name&><&else&><&$objConfigModel->getGenGoal($goal.gen_goal_id)&><&/if&>"><input type="button" class="button button_1" value="Cheer me on" /></a>
                <&else&>
                    <&if (!$user || $user.user_type == 1) && $goal.status <= 2 &>
                    <a href="<&$web_site&>/goal/bid/gid/<&$goal.id&>" class="button button_3" id="trainer_bid_button">Trainer bid</a>
                    <&/if&>
                    <a href="#pop4" class="show_pop4" id="<&$goal.id&>" goal_name="<&if $goal.gen_goal_id == 0&><&$goal.goal_name&><&else&><&$objConfigModel->getGenGoal($goal.gen_goal_id)&><&/if&>"><input type="button" class="button button_3" value="Cheer me on" /></a>
                <&/if&>
                <ul>
                	<li class="c-num"><span><&$goal.cheerleader_cnt&> cheerleaders</span></li>
                    <li class="b-num"><span><&$goal.bid_cnt&> Bids</span></li>
                    
                    <fb:like send="false" layout="button_count" width="150" show_faces="false"></fb:like>
                    <!--<li class="t-num"><a href="#nogo"><label>125</label></a></li>-->
                </ul>
                             
               </div>
               
               <div class="box2">
               		<div class="title">Goal status</div>
            		<div class="status">
                		<div class="gray"></div>
                    	<div class="blue num-<&$goal.status&>"></div><!--数值num-1代表1格，以此类推-->
                    	<div class="num"><&$goal.status&>/5</div>
                	</div>
                    <table cellpadding="0" cellspacing="0" border="0" class="status-lists">
                    	<tr class="complete"><td class="w_60"><&$objConfigModel->getStatus(1)&></td><td><&$goal.created_time|date_format:"%m/%d/%Y"&></td></tr>
                        <tr <&if $goal.status >= 2&>class="complete"<&/if&>><td><&$objConfigModel->getStatus(2)&></td><td><&if $goal.status >= 2&><&$goal.bid_received_time|date_format:"%m/%d/%Y"&><&else&>not yet<&/if&></td></tr>
                        <tr <&if $goal.status >= 3&>class="complete"<&/if&>><td><&$objConfigModel->getStatus(3)&></td><td><&if $goal.status >= 3&><&$goal.award_time|date_format:"%m/%d/%Y"&><&else&>not yet<&/if&></td></tr>

                        <tr <&if $goal.status >= 4&>class="complete"<&/if&>><td><&$objConfigModel->getStatus(4)&></td><td><&if $goal.status >= 4&><&$goal.review_time|date_format:"%m/%d/%Y"&><&else&>not yet<&/if&></td></tr>
                        <tr <&if $goal.status >= 5&>class="footer"<&/if&>><td><&$objConfigModel->getStatus(5)&></td><td><&if $goal.status >= 5&><&$goal.reach_time|date_format:"%m/%d/%Y"&><&else&>not yet<&/if&></td></tr>
                    </table>
            	</div>
                <&if $goal.status >= 4&>
                <div class="box3">
                	<p><&$objConfigModel->genUsername($goal.review.reviewed_user.firstname, $goal.review.reviewed_user.lastname)&> submitted offers on this Task</p>
                    <div class="about">
                    	<strong class="y"><&$objConfigModel->genUsername($goal.review.reviewer_user.firstname, $goal.review.reviewer_user.lastname)&> Rating for this Task</strong>
                        <label id="star" class="s_<&$goal.review.score&>"></label>
                        <a href="<&$web_site&>/user/detail/uid/<&$goal.review.reviewed_user.id&>"><img src="<&$web_site&>/<&$goal.review.reviewed_user.thumb_photo&>" />
                        <span><&$objConfigModel->genUsername($goal.review.reviewed_user.firstname, $goal.review.reviewed_user.lastname)&></span></a>
                        <s></s>
                    </div>
                    <p class="y">Client's Comment: <br /><&$goal.review.content&></p>
                </div>
                <&/if&>
            </div>
            
 			
			
<!---->                        
        </div>
    </div>
<!--page_text_over-->
<&include file="include/cheer_pop.tpl"&>

<&include file="include/footer.tpl" page_js=""&>
